home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1984-07-08 | 3.4 KB | 108 lines |
- 10 ' File: EUROPE.BAS
- 20 '
- 30 ' ** NATIONS AND CAPITALS OF EUROPE **
- 40 '
- 50 FOR N=1 TO VAL(RIGHT$(TIME$,2)):X=RND:NEXT N
- 60 M$=" NATIONS AND CAPITALS OF EUROPE"+CHR$(13)+STRING$(40,42)
- 70 SCREEN 0,0,0:COLOR 7,0,0:WIDTH 40:KEY OFF:CLS:PRINT M$
- 80 PRINT:PRINT "This tutorial, multiple-choice program"
- 90 PRINT"challenges you to learn and recall the
- 100 PRINT"capital cities of the nations of
- 110 PRINT"Europe.":PRINT
- 120 PRINT"The program continues repeating a ques-
- 130 PRINT"tion as long as you are making in-
- 140 PRINT"correct responses. Watch the selections
- 150 PRINT"change somewhat with each incorrect
- 160 PRINT"response, however -- the changes pro-
- 170 PRINT"vide cluse to the correct answer.
- 180 LOCATE 24,1:PRINT "Strike any key to begin ...";
- 190 DEF SEG=0:POKE 1050,PEEK(1052)
- 200 K$=INKEY$:IF K$="" THEN 200
- 210 FOR N=1 TO VAL(RIGHT$(TIME$,2)):X=RND:NEXT N
- 220 SCREEN 0,0,0:COLOR 7,0,0:WIDTH 40:KEY OFF:CLS:PRINT M$
- 230 DIM I$(33,4)
- 240 FOR X=1 TO 33:READ N:FOR Y=1 TO 4:READ I$(X,Y):NEXT Y,X
- 250 X=INT(33*RND)+1
- 260 FOR N=1 TO 3:Q$(N)=I$(X,N+1):NEXT N
- 270 Q$(4)=I$(INT(33*RND)+1,INT(3*RND)+2)
- 280 FOR N=1 TO 3
- 290 IF Q$(4)=Q$(N) THEN 270
- 300 NEXT N
- 310 Q$(5)="None of the above"
- 320 CR=INT(4*RND)+1
- 330 FOR N=1 TO 4
- 340 C=0
- 350 R$(N)=Q$(INT(4*RND)+1)
- 360 C=C+1:IF C < 10 THEN 390
- 370 LOCATE 3,1:COLOR 23,0
- 380 PRINT "PLEASE WAIT ...":COLOR 7,0
- 390 IF N=1 THEN 430
- 400 FOR Y=1 TO N-1
- 410 IF R$(Y)=R$(N) THEN 350
- 420 NEXT Y
- 430 NEXT N
- 440 R$(5)=Q$(5)
- 450 CLS:PRINT M$
- 460 PRINT "Which of the following is the capital of"
- 470 PRINT I$(X,1)" (1-5)?"
- 480 PRINT
- 490 FOR N=1 TO 5
- 500 PRINT TAB(5)N"- "R$(N)
- 510 NEXT N
- 520 PRINT
- 530 K$=INKEY$:IF K$="" THEN 530
- 540 IF K$<"1" OR K$>"5" THEN 530
- 550 PRINT K$
- 560 NT=NT+1
- 570 IF R$(VAL(K$))=I$(X,2) THEN 590
- 580 PRINT:PRINT "Sorry, that is not correct.":GOSUB 610:GOTO 260
- 590 PRINT:PRINT "That is correct."
- 600 NC=NC+1:GOSUB 610:GOTO 250
- 610 COLOR 0,7
- 620 LOCATE 17,1
- 630 SC=INT(100*NC/NT)
- 640 PRINT NC"correct out of"NT;SPC(32-POS(0))
- 650 PRINT
- 660 PRINT SPC(1)"for a score of"SC"%"SPC(32-POS(0))
- 670 COLOR 7,0
- 680 LOCATE 20,1
- 690 PRINT "Strike the SPACE BAR to continue (or ";
- 700 PRINT "the X key to end the quiz) ...";
- 710 K$=INKEY$:IF K$="" THEN 710
- 720 IF K$=CHR$(32) THEN RETURN
- 730 IF K$="X" OR K$="x" THEN WIDTH 80:END
- 740 GOTO 710
- 750 DATA 1,Albania,Tirana,Durres,Viore
- 760 DATA 2,Andorra,Andorra la Vella,Seo de Urgel,Puigcerda
- 770 DATA 3,Austria,Vienna,Liecht,Graz
- 780 DATA 4,Belgium,Brussels,Antwerp,Ghent
- 790 DATA 5,Bulgaria,Sofia,Plovdiv,Varna
- 800 DATA 6,Czechoslovakia,Prague,Brno,Bratislava
- 810 DATA 7,Denmark,Copenhagen,Arhus,Jutland Peninsula
- 820 DATA 8,Finland,Helsinki,Tampere,Turku
- 830 DATA 9,France,Paris,Marseille,Bordeaux
- 840 DATA 10,East Germany,East Berlin,Leipzig,Dresden
- 850 DATA 11,West Germany,Bonn,Berlin,Munich
- 860 DATA 12,Greece,Athens,Thessaloniki,Patras
- 870 DATA 13,Hungry,Budapest,Miskolc,Debrecen
- 880 DATA 14,Iceland,Reykjavik,Siglufjordhur,Akureyri
- 890 DATA 15,Ireland,Dublin,Cork,Limerick
- 900 DATA 16,Italy,Rome,Milan,Naples
- 910 DATA 17,Liechtenstein,Vaduz,Schaan,Triesen
- 920 DATA 18,Luxembourg,Luxembourg,Esch-Sur-Alzette,Dudelange
- 930 DATA 19,Malta,Valletta,Sliema,Gozo
- 940 DATA 20,Monaco,Monaco,Monte Carlo,San Remo
- 950 DATA 21,Netherlands,Amsterdam,Rotterdam,Hague
- 960 DATA 22,Norway,Oslo,Bergen,Trondheim
- 970 DATA 23,Poland,Warsaw,Cracow,Poznan
- 980 DATA 24,Portugal,Lisbon,Oporto,Braga
- 990 DATA 25,Romania,Bucharest,Brasov,Constanta
- 1000 DATA 26,San Marino,San Marino,Cesena,Pesaro
- 1010 DATA 27,Spain,Madrid,Barcelona,Valencia
- 1020 DATA 28,Sweden,Stockholm,Gotenborg,Malmo
- 1030 DATA 29,Switzerland,Bern,Zurich,Geneva
- 1040 DATA 30,Union of Soviet Socialist Republics (USSR),Moscow,Minsk,Leningrad
- 1050 DATA 31,Great Britain and Northern Ireland,London,Bristol,Liverpool
- 1060 DATA 32,Vatican,Vatican City,San Pedro,Bracciano
- 1070 DATA 33,Yugoslavia,Belgrade,Zagreb,Sarajevo
-